package demo1;

class MyArrayl <E> {
    public Object[] objects = new Object[3];
    public E getPos (int pos) {
        return (E) objects[pos];
    }
    public void setobjects (int pos, E val) {
        objects[pos] = val;
    }
}

public class Test1 {
    public static void main(String[] args) {
        MyArrayl<Integer> b = new MyArrayl<>();
        b.setobjects(1,345);
        int e = b.getPos(1);
        System.out.println(e);
    }
}
